home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-11-08 | 3.0 KB | 95 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: BmpSel.h
- // Release Version: $ 1.0d11 $
- //
- // Author: Henri Lamiraux
- //
- // Copyright: © 1993, 1995 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef BMPSEL_H
- #define BMPSEL_H
-
- // ----- FrameWork Includes -----
-
- #ifndef FWSELECT_H
- #include "FWSelect.h"
- #endif
-
- // ----- Graphic Includes -----
-
- #ifndef FWRECSHP_H
- #include "FWRecShp.h"
- #endif
-
- //========================================================================================
- // Forward Declarations
- //========================================================================================
-
- #if FW_LIB_EXPORT_PRAGMAS
- #pragma lib_export on
- #endif
- class FW_CLASS_ATTR FW_CGraphicContext;
- #if FW_LIB_EXPORT_PRAGMAS
- #pragma lib_export off
- #endif
-
- class FW_CLASS_ATTR CBitmapPart;
- class FW_CLASS_ATTR CBitmapFrame;
-
- //========================================================================================
- // class CBitmapSelection
- //========================================================================================
-
- class FW_CLASS_ATTR CBitmapSelection : public FW_CSelection
- {
- //----------------------------------------------------------------------------------------
- // Initialization/Destruction
- //
- public:
- CBitmapSelection(Environment* ev, CBitmapPart* thePart);
- virtual ~CBitmapSelection();
-
- //----------------------------------------------------------------------------------------
- // Inherited API
- //
- public:
- virtual void CloseSelection(Environment* ev);
- virtual void SelectAll(Environment* ev);
- virtual FW_Boolean IsEmpty(Environment* ev) const;
-
- virtual void DoExternalizeSelection(Environment* ev,
- ODStorageUnit* destinationSU,
- FW_CCloneInfo* cloneInfo);
- virtual FW_Boolean DoInternalizeSelection(Environment* ev,
- ODStorageUnit* sourceSU,
- FW_CCloneInfo* cloneInfo);
-
- virtual ODShape* CreateSelectionFrameShape(Environment* ev) const;
- virtual ODShape* CreateSelectionShape(Environment* ev, ODFacet* facet, FW_CFrame* frame) const;
-
- //----------------------------------------------------------------------------------------
- // New API
- //
- public:
- void GetSelectRect(const FW_CPoint& ratio, const FW_CRect& usedRect, FW_CRect& rect) const;
- void SetSelectRect(const FW_CPoint& ratio, const FW_CRect& usedRect, const FW_CRect& rect);
- void SetSelectRect(const FW_SPlatformRect& rect);
-
- void MoveAnts(Environment* ev, CBitmapFrame* frame);
- void DrawAnts(Environment* ev, CBitmapFrame* frame);
- void DoDrawAnts(Environment* ev, FW_CGraphicContext& fc, CBitmapFrame* frame);
-
- //----------------------------------------------------------------------------------------
- // Data Members
- //
- private:
- CBitmapPart* fBitmapPart;
- FW_SPlatformRect fSelectRect; // it is a FW_SPlatformRect because it is in pixels
- FW_Boolean fHasSelection;
- FW_CRectShape fRectShape;
- };
-
- #endif